package com.boyon.common.status;

import java.util.ArrayList;
import java.util.List;

import com.boyon.common.domain.Value;

/**
 * ClassName:StatusType <br/>
 * Function: 数据状态类型. <br/>
 * Date: 2018年3月13日 下午10:05:46 <br/>
 * 
 * @author sunshulin
 * @version
 * @since JDK 1.8
 * @see
 */
public enum StatusType {

	del(-1, "删除"), create(0, "新建"), stop(1, "停用"), start(2, "启用"), aut(3,
			"审核"), pass(4, "通过"), refuse(5, "拒绝");

	private Integer status;

	private String desc;

	private static List<Value> list = new ArrayList<>();

	static {
		list.add(new Value(StatusType.del.status, StatusType.del.desc));
		list.add(new Value(StatusType.create.status, StatusType.create.desc));
		list.add(new Value(StatusType.stop.status, StatusType.stop.desc));
		list.add(new Value(StatusType.start.status, StatusType.start.desc));
		list.add(new Value(StatusType.aut.status, StatusType.aut.desc));
		list.add(new Value(StatusType.pass.status, StatusType.pass.desc));
		list.add(new Value(StatusType.refuse.status, StatusType.refuse.desc));
	}

	/**
	 * Creates a new instance of StatusType.
	 * 
	 * @param status
	 * @param desc
	 */
	private StatusType(Integer status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	/**
	 * status.
	 * 
	 * @return the status
	 * @since JDK 1.8
	 */
	public Integer getStatus() {
		return status;
	}

	/**
	 * desc.
	 * 
	 * @return the desc
	 * @since JDK 1.8
	 */
	public String getDesc() {
		return desc;
	}

	/**
	 * list.
	 * 
	 * @return the list
	 * @since JDK 1.8
	 */
	public static List<Value> getList() {
		return list;
	}
}
